package xyz.yang.toodles.statemachine;

import java.time.Instant;

/**
 * @author Xuehong Yang
 * @since 1.0
 */
public class ProcessStep {
    private String id;
    private Event event;
    private Operator operator;
    private Instant processingTime;
    private String comment;

    public ProcessStep(String id, Event event, Operator operator, Instant processingTime, String comment) {
        this.id = id;
        this.event = event;
        this.operator = operator;
        this.processingTime = processingTime;
        this.comment = comment;
    }

    public static ProcessStep of(String id, Event event, Operator operator, String comment) {
        return new ProcessStep(id, event, operator, Instant.now(), comment);
    }
}
